
<?php 
	$sql="select * from {$this->prename}members where uid=?";
	$userData=$this->getRow($sql, $args[0]);
	
	if($userData['parentId']){
		$parentData=$this->getRow("select fanDian from {$this->prename}members where uid=?", $userData['parentId']);
	}else{
		$this->getSystemSettings();
		$parentData['fanDian']=$this->settings['fanDianMax'];
	}
	$sonFanDianMax=$this->getRow("select max(fanDian) sonFanDian from {$this->prename}members where isDelete=0 and parentId=?",$args[0]);
	//print_r($parentData);
?>

<div>
<style type="text/css">
.ui-dialog {
    width: 550px !important;
}
</style>
<input type="hidden" value="<?=$this->user['username']?>" />
<form action="/admin778899.php/member/userUpdateParented" target="ajax" method="post" call="userDataSubmitCode" onajax="userParentDataBeforeSubmitCode" dataType="html">
	<input type="hidden" name="type" value="<?=$userData['type']?>"/>
	<input type="hidden" name="uid" value="<?=$args[0]?>"/>
      <!--uid  isDelete  enable  parentId 会员从属关系 parents 上级系列 admin  username  coinPassword  type 是否代理：0会员，1代理 subCount 人数配额 sex  nickname  name 用户真实姓名 regIP  regTime  updateTime  province  city  address  password  qq  msn  mobile  email  idCard 身份证号码 grade 等级 score 积分 coin 个人财产 fcoin 冻结资产 fanDian 用户设置的返点数 safepwd 交易密码，请区别于登录密码 safeEmail 密保邮箱，与邮箱分开 -->
	<table cellpadding="2" cellspacing="2" class="popupModal">
		<tr>
			<td class="title"width="210">用户名：</td>
			<td><label><?=$userData['username']?></label></td>
		</tr>
		<tr>
			<td class="title"width="210">上线id：</td>
			<td><input type="number" name="parentId" value="<?=$userData[parentId]?>" />&nbsp;</td>
		</tr>
		<tr style=" <?php  if(!$userData['type']){ echo 'display:none;'; }?>">
			<td class="title">返点:<br />(分成比例)</td>
			<td><input type="text" name="fanDian" value="<?=$userData['fanDian']?>" max="<?=$parentData['fanDian']?>" min="<?=$sonFanDianMax['sonFanDian']?>" fanDianDiff=<?=$this->settings['fanDianDiff']?> >%&nbsp;&nbsp;&nbsp;&nbsp;<span style="color:#999"><?=$this->ifs($sonFanDianMax['sonFanDian'],'0')?>—<?=$parentData['fanDian']?>%</span><br />注:此处为代理功能</td>
		</tr>
	</table>
</form>
</div>